package no.ntnu.tdt4237.helperactions;

public class FilterXSS {
		
	public static String filter(String input){
		
		input = input.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
		input = input.replaceAll("eval\\((.*)\\)", "");
		input = input.replaceAll("[\\\"\\\'][\\s]*((?i)javascript):(.*)[\\\"\\\']", "\"\"");
		input = input.replaceAll("((?i)script)", "");
		return input;
	}

}
